Since intraframe prediction encoding that performs a prediction within the same frame can hardly achieve compression efficiency as high as that achieved by interframe prediction encoding that performs a prediction between different frames, there is a demand for an intraframe prediction encoding scheme with high compression efficiency. Moreover, there is a possibility that the improvement of compression efficiency obtained by the intraframe encoding contributes to the improvement of compression efficiency of interframe encoding that refers to the image, and thus in view of this, the improvement of compression efficiency of an intraframe prediction encoding scheme is expected.
The intraframe prediction, which performs a prediction within the same frame in spatial dimensions, has been adopted since video encoding standard H.264/MPEG-4AVC (e.g. refer to pp. 106 of non-patent document 1).
The intraframe prediction is performed on a block by block basis, and in H.264/MPEG-4AVC, three kinds of block sizes (4×4, 8×8, and 16×16) can be used with respect to a luminance signal. Moreover, in the respective block sizes, a plurality of prediction modes can be selected. In the case of a 4×4 and 8×8 block size, 9 kinds of prediction modes have been prepared, and in the case of a 16×16 block size, 4 kinds of prediction modes have been prepared.
With respect to a chrominance signal, only the 8×8 block size can be used, and its prediction direction is the same as that in the luminance signal of a 16×16 block. However, the relationship between prediction mode numbers and prediction directions is different therefrom (e.g. refer to pp. 106-112 of non-patent document 1 and pp. 116-135 of non-patent document 2).
For these various kinds of block sizes and prediction modes, without any exceptions, pixels generated through the intraframe prediction are obtained by copying the same values as those of pixels which are positioned on a block neighboring a block to be encoded and which are nearest to the block to be encoded, without changing the values of the pixels.
As a concrete example, FIG. 36 illustrates the case in which a block to be encoded is a 4×4 block of a luminance signal and its prediction mode is a vertical prediction (a prediction mode 0). Hereinafter, explanation will be made assuming a luminance signal is used unless otherwise mentioned.
In the concrete example as shown in FIG. 36, the value of a pixel X in a block positioned on the upper left of a block to be encoded, the values of pixels A, B, C, and D in a block positioned on the block to be encoded, the values of pixels E, F, G, and H in a block positioned on the upper right of the block to be encoded, and the values of pixels I, J, K, and L in a block positioned on the left of the block to be encoded are used in the prediction.
Since a prediction mode 0 is a prediction in the vertical direction, the value (e.g. 73) of the pixel A is copied into four successive pixels which are positioned below the pixel A. In the same manner, the value (e.g. 79) of the pixel B, the value (e.g. 86) of the pixel C, and the value (e.g. 89) of the pixel D are copied into four successive pixels which are positioned below the pixels B, C, and D, respectively.
As described above, in the conventional art, pixels generated through the intraframe prediction are obtained by copying the same values as those of pixels which are positioned on a block neighboring a block to be encoded and which are nearest to the block to be encoded, without changing the values of the pixels.
In this case, depending on the position of the block to be encoded, there may be no block to be referred to. In this case, the prediction can be performed by assigning a value of 128 or the value of a neighboring pixel. For example, in a block including the uppermost row of a frame, nine pixels from X to H cannot always be referred to, and thus the value of 128 is used. Moreover, if upper left and upper blocks exist, but an upper right block does not exist, predicted pixels are generated by assigning the value of the pixel D to the pixels E, F, G, and H.
Moreover, as an improved intraframe prediction technique, a scheme has been proposed that enables an interpolating prediction from pixels positioned on the right side or lower side of a block by changing the scanning order of blocks in a macro block (e.g. refer to non-patent document 3).
This scheme has proposed that if it is assumed that two kinds of prediction modes A and B are selected from a plurality of prediction mode candidates and predicted values in the case of applying the selected prediction modes to a pixel position (i, j) are indicated as sA(i, j) and sB(i, j), the predicted value sbipred(i, j) of the pixel in the pixel position (i, j) is calculated by the following equation,Sbipred(i,j)=a·sA(i,j)+b·sB(i,j), where a and b are weight values.[Non-Patent Document 1] Sakae Okubo, Shinya Kadono, Yoshihiro Kikuchi, and Teruhiko Suzuki: “Revised Version H.264/AVC Textbook,” pp. 106-112, 2006[Non-Patent Document 2] ITU-T Study Group 16-Question 6/16: “Draft new Corrigendum 1 to 1-1.264 “Advanced video coding for generic audiovisual services,” pp. 116-135, 2005[Non-Patent Document 3] Taichiro Shiodera, Akiyuki Tanizawa, and Takeshi Chujoh: “Block Based Extra/Intra-polating Prediction for Intra Coding,” Picture Coding Symposium of Japan, 21st Symposium Data, pp. 123-124, 2006